package com.ruoyi.production.service.impl.plug;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.production.domain.plug.PlugApplyTemporary;
import com.ruoyi.production.mapper.plug.PlugApplyTemporaryMapper;
import com.ruoyi.production.service.plug.IPlugApplyTemporaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 穴盘临时申请Service业务层处理
 *
 * @author ruoyi
 * @date 2021-07-11
 */
@Service
public class PlugApplyTemporaryServiceImpl implements IPlugApplyTemporaryService
{
    @Autowired
    private PlugApplyTemporaryMapper plugApplyTemporaryMapper;

    /**
     * 查询穴盘临时申请
     *
     * @param plugApplyTemporaryId 穴盘临时申请ID
     * @return 穴盘临时申请
     */
    @Override
    public PlugApplyTemporary selectPlugApplyTemporaryById(Long plugApplyTemporaryId)
    {
        return plugApplyTemporaryMapper.selectPlugApplyTemporaryById(plugApplyTemporaryId);
    }

    /**
     * 查询穴盘临时申请列表
     *
     * @param plugApplyTemporary 穴盘临时申请
     * @return 穴盘临时申请
     */
    @Override
    public List<PlugApplyTemporary> selectPlugApplyTemporaryList(PlugApplyTemporary plugApplyTemporary)
    {
        return plugApplyTemporaryMapper.selectPlugApplyTemporaryList(plugApplyTemporary);
    }

    /**
     * 新增穴盘临时申请
     *
     * @param plugApplyTemporary 穴盘临时申请
     * @return 结果
     */
    @Override
    public int insertPlugApplyTemporary(PlugApplyTemporary plugApplyTemporary)
    {












        plugApplyTemporary.setCreateTime(DateUtils.getNowDate());



        return plugApplyTemporaryMapper.insertPlugApplyTemporary(plugApplyTemporary);
    }

    /**
     * 修改穴盘临时申请
     *
     * @param plugApplyTemporary 穴盘临时申请
     * @return 结果
     */
    @Override
    public int updatePlugApplyTemporary(PlugApplyTemporary plugApplyTemporary)
    {
        plugApplyTemporary.setUpdateTime(DateUtils.getNowDate());
        return plugApplyTemporaryMapper.updatePlugApplyTemporary(plugApplyTemporary);
    }

    /**
     * 批量删除穴盘临时申请
     *
     * @param plugApplyTemporaryIds 需要删除的穴盘临时申请ID
     * @return 结果
     */
    @Override
    public int deletePlugApplyTemporaryByIds(Long[] plugApplyTemporaryIds)
    {
        return plugApplyTemporaryMapper.deletePlugApplyTemporaryByIds(plugApplyTemporaryIds);
    }

    /**
     * 删除穴盘临时申请信息
     *
     * @param plugApplyTemporaryId 穴盘临时申请ID
     * @return 结果
     */
    @Override
    public int deletePlugApplyTemporaryById(Long plugApplyTemporaryId)
    {
        return plugApplyTemporaryMapper.deletePlugApplyTemporaryById(plugApplyTemporaryId);
    }
}
